package cn.usian.service.impl;

import cn.usian.dao.UserMapper;
import cn.usian.pojo.User;
import cn.usian.service.UserService;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Resource
    private UserMapper userMapper;


    @Override
    public Page<User> findPage(int current, int size) {
        return null;
    }

    @Override
    public void del(Long id) {
        userMapper.deleteById(id);
    }

    @Override
    public User findById(Long id) {
        return userMapper.selectById(id);
    }

    @Override
    public void update(User user) {
        userMapper.updateById(user);
    }

    @Override
    public void add(User user) {
        userMapper.insert(user);
    }

    @Override
    public List<User> findByName(String name) {
        return null;
    }
}
